<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>Title</title>
</head>
<style>
body, html {
    margin: 0;
    padding: 0;
}
#layout {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

#header {
    height: 100px;
    box-shadow: 2px 5px 5px 0px rgba(102,102,102,0.5);
    background: aqua;
    flex-shrink: 0;
}

#footer {
    height: 100px;
    background: coral;
    flex-shrink: 0;
}

#main {
    flex-grow: 2;
    background: cornflowerblue;
    overflow-y: auto;
}

h1, h2 {
    padding: 10px;
}
</style>
<body>
<div id="layout">
    <header id="header">
        <h1>这里是头部</h1>
    </header>
    <main id="main">
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
        <h2>这里是内容</h2>
    </main>
    <footer id="footer">
        <h1>这里是尾部</h1>
    </footer>
</div>
</body>
</html>
